/*
 * @Description:
 * @Version: 1.0
 * @Autor: liujun
 * @Date: 2020-12-16 10:05:21
 * @LastEditors: liujun
 * @LastEditTime: 2020-12-16 14:04:51
 */

// initial state
const state = {
  channelSubjectList: [],
  subjectMap: null
};

const getters = {};
const actions = {};
const mutations = {
  SET_CHANNEL_SUB: (state, LIST) => {
    state.channelSubjectList = LIST;
    var map = new Map();
    LIST.forEach(element => {
      map.set(element.id, element.name);
    });
    state.subjectMap = map;
  }
};

export default {
  namespaced: true,
  state,
  getters,
  actions,
  mutations
};
